package com.example.dishfo.myapplication.util;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

public class JsonUtil {
    public static JsonElement getFromJson(String name,String json){
        try {
            JsonObject object=new Gson().fromJson(json,JsonObject.class);
            return object.get(name);
        }catch (Exception e){
            return null;
        }
    }
}
